<?php
/**
 * Interface UserInterface_IInputSecurity
 */
interface UserInterface_IInputSecurity
{
    /**
     * CSRF Verify
     *
     * @return UserInterface_IInputSecurity
     */
    public function csrf_verify();

    /**
     * CSRF Set Cookie
     *
     * @return UserInterface_IInputSecurity
     */
    public function csrf_set_cookie();

    /**
     * Get CSRF Hash
     *
     * @return string
     */
    public function get_csrf_hash();

    /**
     * Get CSRF Token Name
     *
     * @return string
     */
    public function get_csrf_token_name();

    /**
     * XSS Clean
     *
     * @param string|string[] $str Input data
     * @param bool            $is_image Whether the input is an image
     *
     * @return string
     */
    public function xss_clean($str, $is_image = false);

    /**
     * XSS Hash
     * Generates the XSS hash if needed and returns it.
     *
     * @return string
     */
    public function xss_hash();

    /**
     * HTML Entities Decode
     *
     * @param string $str Input
     * @param string $charset Character set
     * @return string
     */
    public function entity_decode($str, $charset = NULL);

    /**
     * Sanitize Filename
     *
     * @param string $str Input file name
     * @param bool   $relative_path Whether to preserve paths
     * @return string
     */
    public function sanitize_filename($str, $relative_path = false);

    /**
     * Strip Image Tags
     *
     * @param string $str
     * @return string
     */
    public function strip_image_tags($str);

    /**
     * Load specific configuration item
     *
     * @param string $name The name of the setting
     * @return mixed
     */
    public function get_config($name);
}
